<?php 
/*
session_start();
if(isset($_SESSION['name']))
{
   	if($_SESSION['name'] != 'junett')
	{
       	 header('Location: login.php?err=1');
	}
}else
{
  //die('Unauthorized Access2');	
  header('Location: login.php?err=1');
}
// */
include_once("includes/header.php");



$date = date('Y-m-d H:i:s');
$settings = new SETTINGS(1);

//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(isset($_POST['btnSubmit1']))
{
	$slidesClass = new MAIN('slides','slideid',1);
	
	if(!$slidesClass->getVar('slideid')){
		  # INSERT 
		  $slideOne = new SLIDES;	  
	}
	else{
		  # UPDATE
		  $slideOne = new SLIDES(1);
	}
	# PREPARE THE ARRAY
	$data = array('slidelocation'=>1,'slidephoto'=>'1.jpg','slidetitle'=>$_POST['txtSlideTitle'],'content'=>$_POST['txtContent'],'dateposted'=>$date,'status'=>1); 
	
	# EXECUTE
	$slideOne->saveArray($data);
	echo"Published. Yay! <a href=\"index.php\">[view post]</a>"; 
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(isset($_POST['btnSubmit2']))
{
	$slidesClass = new MAIN('slides','slideid',2);
	
	if(!$slidesClass->getVar('slideid')){
		  # INSERT 
		  $slideOne = new SLIDES;	  
	}
	else{
		  # UPDATE
		  $slideOne = new SLIDES(2);
	}
	# PREPARE THE ARRAY
	$data = array('slidelocation'=>2,'slidephoto'=>'2.jpg','slidetitle'=>$_POST['txtSlideTitle'],'content'=>$_POST['txtContent'],'dateposted'=>$date,'status'=>1); 
	
	# EXECUTE
	$slideOne->saveArray($data);
	echo"Published. Yay! <a href=\"index.php\">[view post]</a>"; 
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(isset($_POST['btnSubmit3']))
{
	$slidesClass = new MAIN('slides','slideid',3);
	
	if(!$slidesClass->getVar('slideid')){
		  # INSERT 
		  $slideOne = new SLIDES;	  
	}
	else{
		  # UPDATE
		  $slideOne = new SLIDES(3);
	}
	# PREPARE THE ARRAY
	$data = array('slidelocation'=>3,'slidephoto'=>'3.jpg','slidetitle'=>$_POST['txtSlideTitle'],'content'=>$_POST['txtContent'],'dateposted'=>$date,'status'=>1); 
	
	# EXECUTE
	$slideOne->saveArray($data);
	echo"Published. Yay! <a href=\"index.php\">[view post]</a>"; 
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(isset($_POST['btnSubmit4']))
{
	$slidesClass = new MAIN('slides','slideid',4);
	
	if(!$slidesClass->getVar('slideid')){
		  # INSERT 
		  $slideOne = new SLIDES;	  
	}
	else{
		  # UPDATE
		  $slideOne = new SLIDES(4);
	}
	# PREPARE THE ARRAY
	$data = array('slidelocation'=>4,'slidephoto'=>'4.jpg','slidetitle'=>$_POST['txtSlideTitle'],'content'=>$_POST['txtContent'],'dateposted'=>$date,'status'=>1); 
	
	# EXECUTE
	$slideOne->saveArray($data);
	echo"Published. Yay! <a href=\"index.php\">[view post]</a>"; 
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(isset($_POST['btnSubmit5']))
{
	$slidesClass = new MAIN('slides','slideid',5);
	
	if(!$slidesClass->getVar('slideid')){
		  # INSERT 
		  $slideOne = new SLIDES;	  
	}
	else{
		  # UPDATE
		  $slideOne = new SLIDES(5);
	}
	# PREPARE THE ARRAY
	$data = array('slidelocation'=>5,'slidephoto'=>'5.jpg','slidetitle'=>$_POST['txtSlideTitle'],'content'=>$_POST['txtContent'],'dateposted'=>$date,'status'=>1); 
	
	# EXECUTE
	$slideOne->saveArray($data);
	echo"Published. Yay! <a href=\"index.php\">[view post]</a>"; 
}
///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
if(isset($_POST['btnUpload']))
{
	$avatarClass = new AvatarClass;
	
	$files      = isset($_FILES['uploader']) ? $_FILES['uploader'] : false;  
	$validExt 	= array('.jpg', '.jpeg', '.gif', '.png', '.bmp');
	$getExt   	= strtolower(strrchr($files["name"], '.'));
	$filename   = $_POST['selNum'];
	
	$targetFileName = $filename.$getExt;
						
	// SET TARGET DESTINATION
	$targetAvatar = DOC_ROOT . "media/images/gallery/" .$targetFileName;
							
	// MOVE THE IMAGE AND SAVE IT
	$avatarClass->uploadAvatar($files, $targetAvatar,"",570);	
	
	//echo "here: " . $targetAvatar;		
}

function titleColorOpt()
{
	$colors = array("black"=>"#000","orange"=>"#F90","teal"=>"#069","gray"=>"#999","white"=>"#FFF","purple"=>"#639","pink"=>"#F69");
/*	
   $opt  = ($default=='#000')?'<option value="#000" selected="selected">Black</option>':'<option value="#000">Black</option>';
   $opt .= $default=='#F90'?'<option value="#F90" selected="selected">Orange</option>':'<option value="#F90">Orange</option>';
   $opt .= $default=='#069'?'<option value="#069" selected="selected">Teal</option>':'<option value="#069">Teal</option>';
   $opt .= $default=='#CCC'?'<option value="#CCC" selected="selected">Gray</option>':'<option value="#CCC">Gray</option>';
   $opt .= $default=='#FFF'?'<option value="#FFF" selected="selected">White</option>':'<option value="#FFF">White</option>';
   $opt .= $default=='#639'?'<option value="#639" selected="selected">Purple</option>':'<option value="#639">Purple</option>';
   $opt .= $default=='#FCC'?'<option value="#FCC" selected="selected">Pink</option>':'<option value="#FCC">Pink</option>';
 */
   return $colors;
   
}
 ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
function setColor($currentColor, $color)
 {
	if($currentColor == $color)
	  {
		$bgColor = "border: 2px #F00 solid";   
	  } 
	else
	 {
		$bgColor = "border: 1px #999 solid";
	  }
		return $bgColor;
}
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
    if(isset($_POST['btnSettings']))
	{
	  // $settingObj = new SETTINGS(1);
	    
	   
	   $data = array('bgcolor'=>$_POST['selBgColor'],
	   				 'theme'=>$_POST['selTheme'],
					 'title'=>$_POST['txtTitle'],
					 'titlecolor'=>$_POST['selTitleColor'],
					 'subtitle'=>$_POST['txtSubTitle'],
					 'subtitlecolor'=>$_POST['selSubTitleColor']
	                 ); 	
					 
		 $settings->saveArray($data);
		 echo"Settings Updated. Yay!";			 
	}        
?>
        <h1 style="text-align:right">Junett's Website [admin]</h1>
        <p style="text-align:right"><a href="login.php">[logout]</a></p>
      
        <div id="one">
            <ol>
                <li>
                    <?php
                      # CREATE THE INSTANCE
					  $slide1 = new MAIN('slides','slidelocation',1);
					?>
                    <h2><span><?=$slide1->getVar('slidetitle')?$slide1->getVar('slidetitle'):'title goes here'?></span></h2>
                    <div>
                        <figure><table border="1">
                         <tr>
                               <td width="35%">
                                   <div id="profilePage">
                                   <h4>Image 1:</h4>
                                   <img id='img1' src="<?=WEB_ROOT . 'media/images/gallery/1.jpg'?>" alt="photo 1" width="100%">
                                   </div> 
                               </td>
                              <td style="padding:5px">
                                 
                                 <span style=" vertical-align:middle; font:12px Arial, Helvetica, sans-serif">
                                 <form id="imageform" method="post" enctype="multipart/form-data" action='internal_request/ir_instant_pic_upload.php'>
                                  <div style="display:none"><input type="file" name="fileUploadPic" id="photoimg" />
                                  <input type="text" name="id" value="1" />
                                  </div>
                                  </form>
                                 
                                  <form method="post">
                                  <p style="padding:2px">
                                  <label for="txtSlideTitle">Slide Title: </label>
                                  <input type="text" name="txtSlideTitle" id="txtSlideTitle" value="<?=$slide1->getVar('slidetitle')?>" style="border:#036 solid 1px;" />
                                 
Background color: 
<input type="button" id='black1'  onclick="bgChange('000','1',this.id)" title="black" style="background:#000; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#000')?>" />
<input type="button" id='orange1' onclick="bgChange('F90','1',this.id)" title="orange" style="background:#F90; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#F90')?>" />
<input type="button" id='teal1'   onclick="bgChange('069','1',this.id)" title="teal" style="background:#069; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#069')?>"/>
<input type="button" id='gray1'   onclick="bgChange('CCC','1',this.id)" title="gray" style="background:#CCC; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#CCC')?>"/>
<input type="button" id='white1'  onclick="bgChange('FFF','1',this.id)" title="white" style="background:#FFF; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#FFF')?>"/>
<input type="button" id='purple1' onclick="bgChange('639','1',this.id)" title="purple" style="background:#639; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#639')?>"/>
<input type="button" id='pink1'   onclick="bgChange('FCC','1',this.id)" title="pink" style="background:#FCC; width:12px; <?=setColor($slide1->getVar('bgcolor'),'#FCC')?>"/>
                                  </p>
                                  <textarea name="txtContent" style="height:150px; resize:none">
                                     <?=stripslashes($slide1->getVar('content'));?>
                                  </textarea>
                                   <p style="text-align:right; padding:10px">
                                  <input class="button" type="button" name="uploadImage" id="uploadImage" value="change my photo" />
                                  <input class="button" type="submit" name="btnSubmit1" id="btnSubmit1" value="publish" />
                                  <input class="button" type="reset" name="btnReset1" id="btnReset1" value="default" />
                                    </p>
                                  </form>
                                 </span>
                               </td>
                          </tr>
                          </table>
                        </figure>
                    </div>
                </li>
                <li>
                     <?php
                      # CREATE THE INSTANCE --------------------------------------------------------  TAB NUMBER 2 ---------------------------------
					  $slide2 = new MAIN('slides','slidelocation',2);
					?>
                    <h2><span><?=$slide2->getVar('slidetitle')?$slide2->getVar('slidetitle'):'title goes here'?></span></h2>
                    <div>
                        <figure><table border="1">
                         <tr>
                               <td width="35%">
                                   <div id="profilePage2">
                                   <h4>Image 2:</h4>
                                   <img src="<?=WEB_ROOT . 'media/images/gallery/2.jpg'?>" alt="photo 2" width="100%">
                                   </div> 
                               </td>
                              <td style="padding:5px">
                                 
                                 <span style=" vertical-align:middle; font:12px Arial, Helvetica, sans-serif">
                                 <form id="imageform2" method="post" enctype="multipart/form-data" action='internal_request/ir_instant_pic_upload.php'>
                                  <div style="display:none"><input type="file" name="fileUploadPic" id="photoimg2" />
                                  <input type="text" name="id" value="2" />
                                  </div>
                                  </form>
                                 
                                  <form method="post">
                                  <p style="padding:2px">
                                  <label for="txtSlideTitle">Slide Title: </label>
                                  <input type="text" name="txtSlideTitle" id="txtSlideTitle" value="<?=$slide2->getVar('slidetitle')?>" style="border:#036 solid 1px;" />
                                 Background color: 
<input type="button" id='black2'  onclick="bgChange('000','2',this.id)" title="black" style="background:#000; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#000')?>" />
<input type="button" id='orange2' onclick="bgChange('F90','2',this.id)" title="orange" style="background:#F90; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#F90')?>" />
<input type="button" id='teal2'   onclick="bgChange('069','2',this.id)" title="teal" style="background:#069; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#069')?>"/>
<input type="button" id='gray2'   onclick="bgChange('CCC','2',this.id)" title="gray" style="background:#CCC; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#CCC')?>"/>
<input type="button" id='white2'  onclick="bgChange('FFF','2',this.id)" title="white" style="background:#FFF; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#FFF')?>"/>
<input type="button" id='purple2' onclick="bgChange('639','2',this.id)" title="purple" style="background:#639; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#639')?>"/>
<input type="button" id='pink2'   onclick="bgChange('FCC','2',this.id)" title="pink" style="background:#FCC; width:12px; <?=setColor($slide2->getVar('bgcolor'),'#FCC')?>"/>
                                  </p>
                                  <textarea name="txtContent" style="height:150px; resize:none">
                                     <?=stripslashes($slide2->getVar('content'));?>
                                  </textarea>
                                   <p style="text-align:right; padding:10px">
                                  <input class="button" type="button" name="uploadImage2" id="uploadImage2" value="change my photo" />
                                  <input class="button" type="submit" name="btnSubmit2" id="btnSubmit2" value="publish" />
                                  <input class="button" type="reset" name="btnReset2" id="btnReset2" value="default" />
                                    </p>
                                  </form>
                                 </span>
                               </td>
                          </tr>
                          </table>
                        </figure>
                    </div>
                </li>
                <li>
                     <?php
                      # CREATE THE INSTANCE
					  $slide3 = new MAIN('slides','slidelocation',3);
					?>
                    <h2><span><?=$slide3->getVar('slidetitle')?$slide3->getVar('slidetitle'):'title goes here'?></span></h2>
                    <div>
                        <figure><table border="1">
                         <tr>
                               <td width="35%">
                                   <div id="profilePage3">
                                   <h4>Image 3:</h4>
                                   <img src="<?=WEB_ROOT . 'media/images/gallery/3.jpg'?>" alt="photo 3"  width="100%">
                                   </div> 
                               </td>
                              <td style="padding:5px">
                                 
                                 <span style=" vertical-align:middle; font:12px Arial, Helvetica, sans-serif">
                                 <form id="imageform3" method="post" enctype="multipart/form-data" action='internal_request/ir_instant_pic_upload.php'>
                                  <div style="display:none"><input type="file" name="fileUploadPic" id="photoimg3" />
                                  <input type="text" name="id" value="3" />
                                  </div>
                                  </form>
                                 
                                  <form method="post">
                                  <p style="padding:2px">
                                  <label for="txtSlideTitle">Slide Title: </label>
                                  <input type="text" name="txtSlideTitle" id="txtSlideTitle" value="<?=$slide3->getVar('slidetitle')?>" style="border:#036 solid 1px;" />
                                 Background color: 
<input type="button" id='black3'  onclick="bgChange('000','3',this.id)" title="black" style="background:#000; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#000')?>" />
<input type="button" id='orange3' onclick="bgChange('F90','3',this.id)" title="orange" style="background:#F90; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#F90')?>" />
<input type="button" id='teal3'   onclick="bgChange('069','3',this.id)" title="teal" style="background:#069; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#069')?>"/>
<input type="button" id='gray3'   onclick="bgChange('CCC','3',this.id)" title="gray" style="background:#CCC; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#CCC')?>"/>
<input type="button" id='white3'  onclick="bgChange('FFF','3',this.id)" title="white" style="background:#FFF; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#FFF')?>"/>
<input type="button" id='purple3' onclick="bgChange('639','3',this.id)" title="purple" style="background:#639; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#639')?>"/>
<input type="button" id='pink3'   onclick="bgChange('FCC','3',this.id)" title="pink" style="background:#FCC; width:12px; <?=setColor($slide3->getVar('bgcolor'),'#FCC')?>"/>
                                  </p>
                                  <textarea name="txtContent" style="height:150px; resize:none">
                                     <?=stripslashes($slide3->getVar('content'));?>
                                  </textarea>
                                   <p style="text-align:right; padding:10px">
                                  <input class="button" type="button" name="uploadImage3" id="uploadImage3" value="change my photo" />
                                  <input class="button" type="submit" name="btnSubmit3" id="btnSubmit3" value="publish" />
                                  <input class="button" type="reset" name="btnReset3" id="btnReset3" value="default" />
                                    </p>
                                  </form>
                                 </span>
                               </td>
                          </tr>
                          </table>
                        </figure>
                    </div>
                </li>
                <li>
                     <?php
                      # CREATE THE INSTANCE
					  $slide4 = new MAIN('slides','slidelocation',4);
					?>
                    <h2><span><?=$slide4->getVar('slidetitle')?$slide4->getVar('slidetitle'):'title goes here'?></span></h2>
                    <div>
                        <figure><table border="1">
                         <tr>
                               <td width="35%">
                                   <div id="profilePage4">
                                   <h4>Image 4:</h4>
                                   <img src="<?=WEB_ROOT . 'media/images/gallery/4.jpg'?>" alt="photo 4"  width="100%">
                                   </div> 
                               </td>
                              <td style="padding:5px">
                                 
                                 <span style=" vertical-align:middle; font:12px Arial, Helvetica, sans-serif">
                                 <form id="imageform4" method="post" enctype="multipart/form-data" action='internal_request/ir_instant_pic_upload.php'>
                                  <div style="display:none"><input type="file" name="fileUploadPic" id="photoimg4" />
                                  <input type="text" name="id" value="4" />
                                  </div>
                                  </form>
                                 
                                  <form method="post">
                                  <p style="padding:2px">
                                  <label for="txtSlideTitle">Slide Title: </label>
                                  <input type="text" name="txtSlideTitle" id="txtSlideTitle" value="<?=$slide4->getVar('slidetitle')?>" style="border:#036 solid 1px;" />
                                 Background color: 
<input type="button" id='black4'  onclick="bgChange('000','4',this.id)" title="black" style="background:#000; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#000')?>" />
<input type="button" id='orange4' onclick="bgChange('F90','4',this.id)" title="orange" style="background:#F90; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#F90')?>" />
<input type="button" id='teal4'   onclick="bgChange('069','4',this.id)" title="teal" style="background:#069; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#069')?>"/>
<input type="button" id='gray4'   onclick="bgChange('CCC','4',this.id)" title="gray" style="background:#CCC; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#CCC')?>"/>
<input type="button" id='white4'  onclick="bgChange('FFF','4',this.id)" title="white" style="background:#FFF; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#FFF')?>"/>
<input type="button" id='purple4' onclick="bgChange('639','4',this.id)" title="purple" style="background:#639; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#639')?>"/>
<input type="button" id='pink4'   onclick="bgChange('FCC','4',this.id)" title="pink" style="background:#FCC; width:12px; <?=setColor($slide4->getVar('bgcolor'),'#FCC')?>"/>
                                  </p>
                                  <textarea name="txtContent" style="height:150px; resize:none">
                                     <?=stripslashes($slide4->getVar('content'));?>
                                  </textarea>
                                   <p style="text-align:right; padding:10px">
                                  <input class="button" type="button" name="uploadImage4" id="uploadImage4" value="change my photo" />
                                  <input class="button" type="submit" name="btnSubmit4" id="btnSubmit4" value="publish" />
                                  <input class="button" type="reset" name="btnReset4" id="btnReset4" value="default" />
                                    </p>
                                  </form>
                                 </span>
                               </td>
                          </tr>
                          </table>
                        </figure>
                    </div>
                </li>
                <li>
                    <?php
                      # CREATE THE INSTANCE
					  $slide5 = new MAIN('slides','slidelocation',5);
					?>
                    <h2><span><?=$slide5->getVar('slidetitle')?$slide5->getVar('slidetitle'):'title goes here'?></span></h2>
                    <div>
                        <figure><table border="1">
                         <tr>
                               <td width="35%">
                                   <div id="profilePage5">
                                   <h4>Image 5:</h4>
                                   <img src="<?=WEB_ROOT . 'media/images/gallery/5.jpg'?>" alt="photo 5"  width="100%">
                                   </div> 
                               </td>
                              <td style="padding:5px">
                                 
                                 <span style=" vertical-align:middle; font:12px Arial, Helvetica, sans-serif">
                                 <form id="imageform5" method="post" enctype="multipart/form-data" action='internal_request/ir_instant_pic_upload.php'>
                                  <div style="display:none"><input type="file" name="fileUploadPic" id="photoimg5" />
                                  <input type="text" name="id" value="5" />
                                  </div>
                                  </form>
                                 
                                  <form method="post">
                                  <p style="padding:2px">
                                  <label for="txtSlideTitle">Slide Title: </label>
                                  <input type="text" name="txtSlideTitle" id="txtSlideTitle" value="<?=$slide5->getVar('slidetitle')?>" style="border:#036 solid 1px;" />
                                 Background color: 
<input type="button" id='black5'  onclick="bgChange('000','5',this.id)" title="black" style="background:#000; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#000')?>" />
<input type="button" id='orange5' onclick="bgChange('F90','5',this.id)" title="orange" style="background:#F90; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#F90')?>" />
<input type="button" id='teal5'   onclick="bgChange('069','5',this.id)" title="teal" style="background:#069; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#069')?>"/>
<input type="button" id='gray5'   onclick="bgChange('CCC','5',this.id)" title="gray" style="background:#CCC; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#CCC')?>"/>
<input type="button" id='white5'  onclick="bgChange('FFF','5',this.id)" title="white" style="background:#FFF; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#FFF')?>"/>
<input type="button" id='purple5' onclick="bgChange('639','5',this.id)" title="purple" style="background:#639; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#639')?>"/>
<input type="button" id='pink5'   onclick="bgChange('FCC','5',this.id)" title="pink" style="background:#FCC; width:12px; <?=setColor($slide5->getVar('bgcolor'),'#FCC')?>"/>
                                  </p>
                                  <textarea name="txtContent" style="height:150px; resize:none">
                                     <?=stripslashes($slide5->getVar('content'));?>
                                  </textarea>
                                   <p style="text-align:right; padding:10px">
                                  <input class="button" type="button" name="uploadImage5" id="uploadImage5" value="change my photo" />
                                  <input class="button" type="submit" name="btnSubmit5" id="btnSubmit5" value="publish" />
                                  <input class="button" type="reset" name="btnReset5" id="btnReset5" value="default" />
                                    </p>
                                  </form>
                                 </span>
                               </td>
                          </tr>
                          </table>
                        </figure>
                    </div>
                </li>
            </ol>
            <noscript>
                <p>Please enable JavaScript to get the full experience.</p>
            </noscript>
        </div>

        <div class="social-buttons">
        <?php
          
		?>
         <h2>Main Page Settings: </h2>
         <form method="post">
           <table>
            <tr align="right">
                <td>Main Page Title: </td>
                <td><input type="text" name="txtTitle" value="<?=$settings->getVar('title')?>" style="width:300px"></td>
                <td>Colors: </td>
                <td>
                <select name="selTitleColor">
               <?php
               foreach(titleColorOpt() as $key => $options)
			   {
				$current =  $settings->getVar('titlecolor');   
				echo $options==$current?"<option value='{$options}' selected='selected'>$key</option>":
				                                               "<option value='{$options}'>$key</option>";   
				}
              ?>
				</select>
                </td>
            </tr>
            <tr align="right">
                <td>Main Page Sub Title: </td>
                <td><input type="text" name="txtSubTitle" value="<?=$settings->getVar('subtitle')?>" style="width:300px"></td>
                <td>Color: </td>
                <td><select name="selSubTitleColor">
                <?php
               foreach(titleColorOpt() as $key => $options)
			   {
				$currentSub   =  $settings->getVar('subtitlecolor');   
				echo $options==$currentSub?"<option value='{$options}' selected='selected'>$key</option>":
				                                               "<option value='{$options}'>$key</option>";   
				}
              ?></select></td>
            </tr>
            <tr align="right">
                <td>Background Color: </td>
                 <td align="left">
                    <select name="selBgColor" style="width:150px">
                       <?php
				   foreach(titleColorOpt() as $key => $options)
				   {
					$currentBg = $settings->getVar('bgcolor');   
					echo $options==$currentBg?"<option value='{$options}' selected='selected'>$key</option>":
																   "<option value='{$options}'>$key</option>";   
					}
              ?>
                    </select>
                 </td>
                 <td>Slider: </td>
                <td>
                <?php
                  $theme = $settings->getVar('theme');
				  echo $theme;
				?>
                  <select name="selTheme">
				  <option value="stitch" <?=$theme=='stitch'?'selected="selected"':''?> >Stitch</option>
                  <option value="dark"   <?=$theme=='dark'?'selected="selected"':''?> >Dark</option>
                  <option value="light"  <?=$theme=='light'?'selected="selected"':''?> >Light</option>
                  </select>
                </td>
            </tr>
           </table>
           <input type="submit" name="btnSettings" value="Update Settings" class="button" />
         </form>
        </div>
        

        
    <script>
            (function($, d) {
                // please don't copy and paste this page
                // it breaks my analytics!

                // demos
                $('#one').liteAccordion({
                        onTriggerSlide : function() {
                            this.find('figcaption').fadeOut();
                        },
                        onSlideAnimComplete : function() {
                            this.find('figcaption').fadeIn();
                        },
                        autoPlay : false,
                        pauseOnHover : true,
                        theme : 'stitch',
                        rounded : true,
                        enumerateSlides : true
                }).find('figcaption:first').show();
				/*
                $('#two').liteAccordion();
                $('#three').liteAccordion({ theme : 'dark', rounded : true, enumerateSlides : true, firstSlide : 2, linkable : true, easing: 'easeInOutQuart' });
                $('#four').liteAccordion({ theme : 'light', firstSlide : 3, easing: 'easeOutBounce', activateOn: 'mouseover' });
                 */ 
                // social links
                var js, id = 'facebook-jssdk';

                if (d.getElementById(id)) return;

                js = d.createElement('script');
                js.id = id;
                js.async = true;
                js.src = "//connect.facebook.net/en_US/all.js#xfbml=1";
                d.getElementsByTagName('head')[0].appendChild(js);

                // Load Plus One Button
                jQuery.getScript('https://apis.google.com/js/plusone.js');
                // Load Tweet Button Script
                jQuery.getScript('https://platform.twitter.com/widgets.js');
                // Load LinkedIn button
                jQuery.getScript('https://platform.linkedin.com/in.js?v=2');
            })(jQuery, document);

            // analytics
            var _gaq = _gaq || [];
            _gaq.push(['_setAccount', 'UA-17442910-1']);
            _gaq.push(['_trackPageview']);

            (function() {
                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
            })();
			
  $(document).ready(function(e) {
///// PHOTO UPLOADERS ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////			

    $('#uploadImage').on('click', function(){
				 $('#photoimg').click();
			});
			
			
        $('#photoimg').on('change', function() { 
					  
						$("#profilePage").html('');
						$("#profilePage").html('<img src="media/system/loader.gif" alt="uploading..." data-upload="true"  style="width:270px; height:300px" />');
						$("#imageform").ajaxForm({target: '#profilePage'}).submit(); // */
			});
		/*--------------------------------------------------------------------*/	
	$('#uploadImage2').on('click', function(){
				 $('#photoimg2').click();
			});	
	$('#photoimg2').on('change', function() { 
					    $("#profilePage2").html('');
						$("#profilePage2").html('<img src="media/system/loader.gif" alt="uploading..." data-upload="true"  style="width:270px; height:300px" />');
						$("#imageform2").ajaxForm({target: '#profilePage2'}).submit(); // */
			});				
	
		/*--------------------------------------------------------------------*/	
	$('#uploadImage3').on('click', function(){
				 $('#photoimg3').click();
			});	
	$('#photoimg3').on('change', function() { 
					    $("#profilePage3").html('');
						$("#profilePage3").html('<img src="media/system/loader.gif" alt="uploading..." data-upload="true"  style="width:270px; height:300px" />');
						$("#imageform3").ajaxForm({target: '#profilePage3'}).submit(); // */
			});				
			/*--------------------------------------------------------------------*/	
	$('#uploadImage4').on('click', function(){
				 $('#photoimg4').click();
			});	
	$('#photoimg4').on('change', function() { 
					    $("#profilePage4").html('');
						$("#profilePage4").html('<img src="media/system/loader.gif" alt="uploading..." data-upload="true"  style="width:270px; height:300px" />');
						$("#imageform4").ajaxForm({target: '#profilePage4'}).submit(); // */
			});				
			/*--------------------------------------------------------------------*/	
	$('#uploadImage5').on('click', function(){
				 $('#photoimg5').click();
			});	
	$('#photoimg5').on('change', function() { 
					    $("#profilePage5").html('');
						$("#profilePage5").html('<img src="media/system/loader.gif" alt="uploading..." data-upload="true"  style="width:270px; height:300px" />');
						$("#imageform5").ajaxForm({target: '#profilePage5'}).submit(); // */
			});				
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////			
			
				    

});			
			
</script>

<?php include("includes/footer.php"); ?>